<template>
    <div class="wbrs-box">
        <div class="title">微博热搜</div>
        <div class="list">
            <div class="item" v-for="(item, index) in wbrs" :key="index">
                <a :href="item.url" class="name" target="_blank" rel="noopener noreferrer">
                    {{ item.name }}
                </a>
            </div>
            <div class="item more">
                <a href="https://weibo.com/hot/search" target="_blank" rel="noopener noreferrer">
                    更多热搜
                </a>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'Wbrs',
    props: {
        wbrs: {
            type: Array,
            default: () => ([])
        }
    },
    data() {
        return {

        }
    }
}
</script>
<style lang="scss" scoped>
.wbrs-box {
    background-color: #fff;
    border: #fff;
    margin: 0 auto 20px;
    padding: 16px;
    box-shadow: 0 4px 8px 6px rgba(7, 17, 21, 0.06);
    border-radius: 8px;
    transition: all .3s;
    cursor: pointer;

    &:hover {
        box-shadow: 0 4px 8px 10px rgba(7, 17, 21, 0.1);
    }

    .title {
        font-size: 16px;
        font-weight: 600;
    }

    .list {
        padding-top: 10px;

        .item {
            background-color: #fff;
            border: #fff;
            margin: 0 auto 10px;
            padding: 3px 10px;
            box-shadow: 0 4px 8px 6px rgba(7, 17, 21, 0.06);
            border-radius: 8px;
            transition: all .3s;

            &:hover {
                a {
                    color: skyblue;
                }
            }
        }

        .more {
            text-align: center;
            transition: all .3s;

            &:hover {
                background-color: #999;

                a {
                    color: #fff;
                }
            }

            a {
                color: skyblue;
            }
        }
    }

    .name {
        text-overflow: -o-ellipsis-lastline;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
    }
}</style>